const router = require('koa-router')()
const loginController = require('../controller/login')


let loginFuc = async (ctx, next) => {
    let openid = await loginController.getToken(ctx.query.code);
    const returnData = await loginController.setOpenid(openid)

    ctx.body = returnData
}
router.get('/wx/login', loginFuc)

module.exports = router
